package com.example.websocketclient.websocket;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.net.URI;
import java.net.URISyntaxException;

@Configuration
public class WebSocketConfig {
    @Value("${websocket.server.url}")
    private String serverUrl;

    @Bean
    public URI webSocketURI() throws URISyntaxException {
        return new URI(serverUrl);
    }
}
